/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.assignment2.question3.violatingSRP.Impl;

import za.ac.cput.assignment2.question3.violatingSRP.Sale;

/**
 *
 * @author Ziyaad
 */
public class SaleImpl implements Sale{
    
    private long saleNumber;
    private String date;
    private double itemPrice;
    private double qauntity;
    
    public SaleImpl(long num, String date, double price, int qty)
    {
        saleNumber = num;
        this.date = date;
        itemPrice = price;
        qauntity = qty;
    }
    

    @Override
    public void setSaleNumber(long num) {
        saleNumber = num;
    }

    @Override
    public void setDate(String date) {
        this.date = date;
    }

    @Override
    public void setItemprice(double price) {
        itemPrice = price;
    }

    @Override
    public void setItemQuantity(int qty) {
        qauntity = qty;
    }

    @Override
    public double getPaymentAmount() {
        return getItemPrice() * getQauntity();
    }

    /**
     * @return the saleNumber
     */
    public long getSaleNumber() {
        return saleNumber;
    }

    /**
     * @return the date
     */
    public String getDate() {
        return date;
    }

    /**
     * @return the itemPrice
     */
    public double getItemPrice() {
        return itemPrice;
    }

    /**
     * @return the qauntity
     */
    public double getQauntity() {
        return qauntity;
    }
    
}
